package com.tjdx.projectsubmission.controller;

import com.tjdx.projectsubmission.server.CollapseSet;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class NodeStateController {


//    @PostMapping("/callJavaService")
//    public String callJavaService(@RequestBody Map<String, String> nodeStates) {
//        // Extract node states from the request
//        String rockty = nodeStates.get("rockty");
//        String geocon = nodeStates.get("geocon");
//        String undwater = nodeStates.get("undwater");
//        String depburial = nodeStates.get("depburial");
//        String span = nodeStates.get("span");
//        String distbadj = nodeStates.get("distbadj");
//        String distbbla = nodeStates.get("distbbla");
//        String stancon = nodeStates.get("stancon");
//        String maqual = nodeStates.get("maqual");
//        String designerr = nodeStates.get("designerr");
//        String intime = nodeStates.get("intime");
//
//        // Set evidence and run the Bayesian network
//        CollapseSet.run(rockty, geocon, undwater, depburial, span, distbadj, distbbla, stancon, maqual, designerr, intime);
//
//        // Return response (you can customize the response as needed)
//        return "Bayesian network updated and probabilities computed.";
//    }
}
